import React, { Component } from 'react';

class ListItem extends Component {
  static defaultProps = {
    text: ''
  }
  render() {
    const {text, checked} = this.props;
    return (
      <li>
        <label>
          <input type="checkbox" checked={checked} onChange={this.props.fnChange}/>
          <span>{text}</span>
        </label>
      </li>
    );
  }

}

export default ListItem;
